package kr.school.main;

import java.util.Scanner;

import kr.school.dao.DepartmentDAO;
import kr.school.dao.StudentDAO;
import kr.school.service.DepartmentService;
import kr.school.service.StudentService;

public class ERP {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		boolean flag = true;
		int res = 0;
		while(flag) {
			System.out.println("1.학생정보\n2.학과정보\n3.종료");
			res = sc.nextInt();
			switch(res) {
				case 1:
					new StudentService(new StudentDAO(), sc);
					break;
				case 2:
					new DepartmentService(new DepartmentDAO(), sc);
					break;
				default:
					flag = false;
					System.exit(0);
					sc.close();
			}
		}
	}
}